/*
 * Copyright (C) 2009-2011 Knowings
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 3
 * as published by the Free Software Foundation.
 *

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
package com.knowings.tbs.transformation;

import com.knowings.tbs.TBSKernelException;

/**
 * Generic exception thrown when a Transformation execution fails.
 * 
 * @author privarola
 */
public class TransformationRuntimeException extends TBSKernelException {
  private static final long serialVersionUID = 3594155636779220316L;
  /**
   * The Transformation UID
   */
  private String uid;

  /**
   * @param uid uid a {@link String} representing the uid of the transformation where the error occurred.
   * @param message a {@link String} object.
   * @param cause a {@link Throwable} object.
   * @see TBSKernelException#TBSKernelException(String, Throwable)
   */
  public TransformationRuntimeException(String uid, String message, Throwable cause) {
    super(message, cause);
    this.uid = uid;
  }

  /**
   * @param uid uid a {@link String} representing the uid of the transformation where the error occurred.
   * @param message a {@link String} object.
   * @see TBSKernelException#TBSKernelException(String)
   */
  public TransformationRuntimeException(String uid, String message) {
    super(message);
    this.uid = uid;
  }

  /**
   * @param uid uid a {@link String} representing the uid of the transformation where the error occurred.
   * @param cause a {@link Throwable} object.
   * @see TBSKernelException#TBSKernelException(Throwable)
   */
  public TransformationRuntimeException(String uid, Throwable cause) {
    super(cause);
    this.uid = uid;
  }

  /**
   * @param uid a {@link String} representing the uid of the transformation where the error occurred.
   * @see TBSKernelException#TBSKernelException()
   */
  public TransformationRuntimeException(String uid) {
    this.uid = uid;
  }

  /** Method retrieving the uid of the transformation where this error occurred.
   * @return a {@link String} object.
   */
  public String getUid() {
    return uid;
  }
}